<?php
$file_name = $_FILES['file']['name'];
$fileType = $_FILES['file']['tmp_name'];

$newValue = md5($file_name . time());

$arr = explode('.', $file_name);

move_uploaded_file($fileType, 'public/image/' . $newValue . '.' . $arr[1]);
